-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hostinfo_unix: Ignore tty(S|ACM) devices in TTY idle time calculation #4126
Conversation
8a8088a
to
cfba160
Compare
@Flowdalic, please remove e37ec47 because we're not support c++17 for all platforms and cfba160 as not related to this PR |
cfba160
to
8d7642a
Compare
I did so, but I am still battling issues caused by the build not even supporting C++11. May I ask which platforms prevent the upgrade to C++17 (or C++11)? At least C++11 should be widely available by now and makes the code a lot easier to read and write. I could live without C++17, but C++11 would be really nice to have. |
@Flowdalic, currently Windows build is the last that is not support C++11 or later. We have planned move to c++11 (or later) but since it's not decided yet, we should still not use any C++11 features. It shouldn't be a big deal to not use any c++11 features in the code because your change isn't big |
Sure, if you are experienced with pre-C++11 coding. But right now I have to find out how to replace my modern idioms with pre-C++11 ones. And additionally, it appears I can only become aware of used C++11 idioms in my code via BOINC's CI, as the build may succeeds locally but fails in the CI because of some CI jobs not supporting C++11. I am not sure, but this, in turn, is probably because BOINC's build system does not specify a C++ standard version (e.g. I do not know how much work it would be to switch BOINC to C++11, but I would suggest that you consider it, because frankly, as "drive-by spare-time contributor" I am not really motivated to code pre-C++11. |
And this definitely will be done soon |
Close and reopen to trigger Github Actions build |
Close and reopen to trigger Github Actions build and creation of artifacts |
8d7642a
to
8a8088a
Compare
I have force pushed this PR back to 8a8088a, i.e. the initial version of this PR. This commit uses a "fancy" for-each loop to iterate over a |
@BOINC/committer, please don't merge it right now |
8a8088a
to
0f0e100
Compare
Codecov Report
@@ Coverage Diff @@
## master #4126 +/- ##
============================================
- Coverage 16.66% 6.40% -10.26%
Complexity 752 752
============================================
Files 134 276 +142
Lines 13131 34902 +21771
Branches 1492 1492
============================================
+ Hits 2188 2235 +47
- Misses 10827 32551 +21724
Partials 116 116
|
The atime (access time) of device nodes whose name starts with /dev/ttyS (serial port) or /dev/ttyACM (serial USB) should not be used for TTY idle time calculation. It is perfectly possible that they are used without any user being active.
@RichardHaselgrove, could you please test this? |
@AenBleidd - not quite sure what you want me to test? I've installed This machine has mouse and keyboard connected via a single USB connection (KVM switch acts as USB hub). Idle time debug log counts upwards as expected, and restarts computation after I've kept my hand off the mouse for three minutes. I can reset the settings to run always over a remote RPC from upstairs, without interrupting work again. But I don't have any other TTY or emulated-TTY devices connected, so I can't tell if they're ignored now. |
At least normal USB mouse is not ignored. That's enough as for me |
The atime (access time) of device nodes whose name starts with
/dev/ttyS (serial port) or /dev/ttyACM (serial USB) should not be used
for TTY idle time calculation. It is perfectly possible that they are
used without any user being active.
Previously BOINC would not run on some of our systems, because those systems also had a monitoring device connected via a serial port. Since this monitoring device is periodically checked, BOINC would assume that a user is active. I think it is sensible to exclude
ttyS
andttyACM
(and probably alsottyUSB
devices. But those I couldn't test as we do not have one of those) from TTY idle time calculation.